<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<script>
function validateForm()
{
    if(document.Rform.firstname.value=="")
    {
      alert("Name should not be left blank");
      document.Rform.firstname.focus();
      return false;
    }
    if(document.Rform.username.value=="")
    {
      alert("User Name should not be left blank");
      document.Rform.username.focus();
      return false;
    }
   if (document.Rform.pwd.value.search(/(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/)==-1)
            {
             alert("Password must be at least one number, one lowercase and one uppercase letter and at least six characters");
            document.Rform.pwd.focus();
             return false;
           }
   if (document.Rform.cpwd.value.search(/(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/)==-1)
          {
              alert("Password must be at least one number, one lowercase and one uppercase letter and at least six characters");
              document.Rform.cpwd.focus();
              return false;
          }
   if(document.Rform.pwd.value != document.Rform.cpwd.value) 
    {
     alert("Password and Confirm Password does'nt match");
     document.Rform.cpwd.focus();
     return false;
    }         
   if(document.Rform.zipcode.value.search(/^\d{5}$|^\d{5}-\d{4}$/)==-1)
    {
      alert("The ZipCode you entered is not valid.\r\nPlease enter a Zipcode with the format xxxxx and xxxxx-xxxx ");
      document.Rform.zipcode.focus();
      return false;
    }
    if(document.Rform.tel.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1)
    {
      alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
      document.Rform.tel.focus();
      return false;
    
    }
    
}
  
function validatePhoneNumber(elementValue){  
var phoneNumberPattern = /^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/;  
return phoneNumberPattern.test(elementValue);  
}  
function validateZipCode(elementValue){
    var zipCodePattern = /^\d{5}$|^\d{5}-\d{4}$/;
     return zipCodePattern.test(elementValue);
}
function validatePassword(elementValue){
    var re = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/;
     return re.test(elementValue);
}

</script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.cookie.js"></script>
<script type="text/javascript" src="translator.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$(".uname").change(function()
{
var uname = $(this).val();
if(uname.length > 3)
{
$(".status").html("Checking availability...");
$.ajax
({
type: "POST",
url: "Check",
data: "uname="+ uname,
success: function(msg)
{
$(".status").ajaxComplete(function(event, request, settings)
{
$(".status").html(msg);
});
}
}); 
}

else
{
$(".status").html("username shold be 3 chars");
}

});


if( $.cookie("lan") == $("#jp").attr("id") ){
       var l = $("#jp").attr("id");
      $("input").each(function(){
          $(this).translate(l);
      });
      $("a").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
  
  $("td").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
  
    $("h2").translate(l);
    $("h3").translate(l);
  
    }else if( $.cookie("lan") == $("#kr").attr("id") ){
            var l = $("#kr").attr("id");
            $("input").each(function(){
                $(this).translate(l);
            });
            $("a").each(function(){
                if ($.trim($(this).text()) != ""){
                $(this).translate(l);    
      }
  });
  
  $("td").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
  
    $("h2").translate(l);
    $("h3").translate(l);
  
    }else if( $.cookie("lan") == $("#cn").attr("id") ){
        var l = $("#cn").attr("id");
      $("input").each(function(){
          $(this).translate(l);
      });
      $("a").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
    $("td").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
  
    $("h2").translate(l);
    $("h3").translate(l);
    }
  
  
  
  
  
  $("#jp").one('click',function(){
      var l = $("#jp").attr("id");
      $.cookie('lan', l);
      $("input").each(function(){
          $(this).translate(l);
      });
      $("a").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
    
    $("td").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
  
    $("h2").translate(l);
    $("h3").translate(l);
      
  });
  
  $("#cn").one('click',function(){
      var l = $("#cn").attr("id");
      $.cookie('lan', l);
      $("input").each(function(){
          $(this).translate(l);
      });
      $("a").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
  
  $("td").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
  
    $("h2").translate(l);
    $("h3").translate(l);
      
      
  });
  
  $("#kr").one('click',function(){
      var l = $("#kr").attr("id");
      $.cookie('lan', l);
      $("input").each(function(){
          $(this).translate(l);
      });
      $("a").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
      $("td").each(function(){
        if ($.trim($(this).text()) != ""){
        $(this).translate(l);    
      }
  });
  
    $("h2").translate(l);
    $("h3").translate(l);
      
  });
  
  $("#us").one('click',function(){
      $.cookie('lan', null);
      location.reload();
      
      
  });
});

</script>
<link href="public.css" rel="stylesheet" type="text/css" />

<link href="dropdown.css" rel="stylesheet" type="text/css" />

<link href="override.css" rel="stylesheet" type="text/css" /> 


</head>

<body>

<div id="container">

        <div id="utilityRow">
   		<div id="utilityLinks">

		<p>
                    <a><input id="jp" type="image" src="jp.png"></input></a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    <a><input id="cn" type="image" src="cn.png"></input></a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    <a><input id="kr" type="image" src="kr.png"></input></a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    <a><input id="us" type="image" src="us.png"></input></a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    <a href="http://www.sematech.org">SEMATECH</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    <a href="https://www.sematech.org">Log in to Member Site</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    <a href="http://ismi.sematech.org/corporate/contact.htm">Contact Us</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    <a href="/sitemap.htm">Site Map</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                    <a href="LoginPage.jsp" >Log in</a>
                 </p>
                </div>	

 	</div>

  <!-- end of utilityRow -->
 <table id="headerRowHomeISMI" >
                <tr>
                    <td id="logoHome"><img src="ISMI.jpg" alt="ISMI Logo" width="275" height="150" border="0" /></td>
                    <td id="feature"><img src="ismi_design_cube.jpg"  width="703" height="150" border="0"/> </td>
   	
                </tr>
</table>
    
        
        <form name="Rform" action="Registration" method="post" onSubmit="return validateForm()">
            <h2 align="center" >ISMI Registration Process</h2>
            <h3 align="center">Please complete this simple form</h3><hr>
            <table align="center">
            <tr>
                <td align="right">* Name :</td>
                <td><input type="text" name="firstname"><input type="text" name="lastname" ></td>
            </tr>

            <tr>
                <td align="right">* Username :</td>
                <td><input type="text" name="uname" class="uname"> <span class="status"></span></td>
            </tr>
            
            

            <tr>
                <td align="right">Password :</td>
                <td><input type="password" name="pwd" value=""></td>
            </tr>
            <tr>
                <td align="right">Confirm Password :</td>
                <td><input type="password" name="cpwd" value=""></td>
            </tr>
            
            <tr>
                <td align="right">Email :</td>
                <td><input type="text" name="email"></td>
            </tr>

            <tr>
                <td align="right">ADDRESS</td>
            </tr>
                
                <tr>
                    <td align="right">Street 1 :</td>
                    <td><input type="text" name="street1"></td>
                </tr>

                <tr>
                    <td align="right">Street 2 :</td>
                    <td><input type="text" name="street2"></td>
                </tr>

                <tr>
                    <td align="right">* Zip Code :</td>
                    <td><input type="text" name="zipcode"></td>
                </tr>
                <tr>
                    <td align="right">Example : 12345 or 12345-6789</td>
                </tr>

                <tr>
                    <td align="right" >*Telephone : </td>
                    <td><input type="tel" name="tel" ></td>
                </tr>
                <tr>
                    <td align="right">Example : 123-456-7890</td>
                </tr>
                
                <tr>
                    <td colspan="2" align="center"><input type="submit" value="register"   ></td>
                </tr>
</table>


</form>
</div>
  </body>
</html>